// TypeScript file
class background extends egret.Sprite {
    public constructor() { 
        super();
		this.addEventListener(egret.Event.ADDED_TO_STAGE, this.addToStage, this);
    }

    public offsetX = 0;    
    addToStage() {
        
        console.log( this.offsetX)
        
        for (let i = 0; i < 3; i++){
            
            let BG = new egret.Bitmap();
            BG.texture = RES.getRes(`long_bg_0${i + 1}_png`);
            BG.x = this.offsetX + (i * 1269);     
            console.log(BG.x)
            BG.height = 1136;
            this.addChild(BG);
        }
            this.offsetX = this.width;
            console.log(this.width);
        
    }


}